package com.iuie.ns.web.tags;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

@SuppressWarnings("serial")
public class LoginDateTag extends TagSupport {
	
	@Override
	public int doStartTag() throws JspException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String date = sdf.format(new Date());
		try {
			pageContext.getOut().write(date);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}
	
}
